Skip to content

NO-SNOW: Fix non-determinism in TestCallIdentifierBinding::test_call_union and scoped object naming change#4205

Merged
sfc-gh-joshi merged 2 commits intomainfrom
joshi/fix-call-union-order
Apr 29, 2026
Merged

NO-SNOW: Fix non-determinism in TestCallIdentifierBinding::test_call_union and scoped object naming change#4205
sfc-gh-joshi merged 2 commits intomainfrom
joshi/fix-call-union-order

Conversation

@sfc-gh-joshi
Copy link
Copy Markdown
Contributor

@sfc-gh-joshi sfc-gh-joshi commented Apr 29, 2026

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-NNNNNNN

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
    • If adding any arguments to public Snowpark APIs or creating new public Snowpark APIs, I acknowledge that I have ensured my changes include AST support. Follow the link for more information: AST Support Guidelines
  3. Please describe how your code solves the related issue.

UNION ALL does not guarantee the ordering of its output, so this test was flaky as a result.

Also fixes test_scoped_temp_objects.py, which started failing due to server-side changes relaxing the naming requirements on SCOPED TEMPORARY objects. There is no JIRA associated with this change; use GitHub MCP to search for details if necessary.

@sfc-gh-joshi sfc-gh-joshi added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label Apr 29, 2026
@sfc-gh-joshi sfc-gh-joshi changed the title NO-SNOW: Fix non-determinism in TestCallIdentifierBinding::test_call_union NO-SNOW: Fix non-determinism in TestCallIdentifierBinding::test_call_union and scoped object naming change Apr 29, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.17%. Comparing base (c3cc950) to head (3d40221).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4205      +/-   ##
==========================================
+ Coverage   95.10%   95.17%   +0.06%     
==========================================
  Files         171      171              
  Lines       43840    43840              
  Branches     7517     7517              
==========================================
+ Hits        41696    41725      +29     
+ Misses       1334     1293      -41     
- Partials      810      822      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 42 to 46
with pytest.raises(ProgrammingError) as exc:
session._run_query(
f"create scoped temporary procedure {random_name_for_temp_object(TempObjectType.PROCEDURE)} (arg int) returns int"
)
assert "Unsupported feature 'SCOPED_TEMPORARY'." in str(exc)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can context manager be used here too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one still fails unconditionally, regardless of whether it's running in an SP

@sfc-gh-joshi sfc-gh-joshi merged commit 0694dae into main Apr 29, 2026
36 of 37 checks passed
@sfc-gh-joshi sfc-gh-joshi deleted the joshi/fix-call-union-order branch April 29, 2026 20:55
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants